gdk: Remove outdated gdk_drag_begin() alternatives
authorBenjamin Otte <otte@redhat.com>
Sun, 10 Dec 2017 13:20:59 +0000 (14:20 +0100)
committerBenjamin Otte <otte@redhat.com>
Mon, 11 Dec 2017 00:02:31 +0000 (01:02 +0100)
There's only one that's ever used, so delete the others and rename this
one to gdk_drag_begin().

docs/reference/gdk/gdk4-sections.txt
gdk/gdkdnd.h
gdk/gdkwindow.c
gtk/gtkdnd.c

index cdc3b8801709866f468673fb32759c6f6ceb3fed..9b76590a582a00be4f5bdc2e8c35161d5b94902e 100644 (file)
@@ -853,8 +853,6 @@ gdk_drag_get_selection
 gdk_drop_reply
 gdk_drag_drop_done
 gdk_drag_begin
-gdk_drag_begin_for_device
-gdk_drag_begin_from_point
 gdk_drop_finish
 GdkDragAction
 gdk_drag_status
index 70c69e12678a371ed521f17f4b70e392dcbc6cd8..ccedece2d8df9c2c0e3c0371689e4fce79978f67 100644 (file)
@@ -138,14 +138,6 @@ GInputStream *          gdk_drop_read_finish            (GdkDragContext        *
 
 GDK_AVAILABLE_IN_ALL
 GdkDragContext *        gdk_drag_begin                  (GdkWindow              *window,
-                                                         GdkContentFormats      *formats);
-
-GDK_AVAILABLE_IN_ALL
-GdkDragContext *        gdk_drag_begin_for_device       (GdkWindow              *window,
-                                                         GdkDevice              *device,
-                                                         GdkContentFormats      *formats);
-GDK_AVAILABLE_IN_3_20
-GdkDragContext *        gdk_drag_begin_from_point       (GdkWindow              *window,
                                                          GdkDevice              *device,
                                                          GdkContentFormats      *formats,
                                                          gint                    x_root,
index 682893ea089b3556fc63e3f34c38d81d3c27b9a5..d14558d72ab0f61c6298afb245d2a44b379c8f46 100644 (file)
@@ -6925,57 +6925,6 @@ gdk_window_register_dnd (GdkWindow *window)
 
 /**
  * gdk_drag_begin:
- * @window: the source window for this drag.
- * @formats: (transfer none): the offered formats
- *
- * Starts a drag and creates a new drag context for it.
- * This function assumes that the drag is controlled by the
- * client pointer device, use gdk_drag_begin_for_device() to
- * begin a drag with a different device.
- *
- * This function is called by the drag source.
- *
- * Returns: (transfer full): a newly created #GdkDragContext
- */
-GdkDragContext *
-gdk_drag_begin (GdkWindow         *window,
-                GdkContentFormats *formats)
-{
-  GdkDisplay *display;
-  GdkDevice *device;
-
-  display = gdk_window_get_display (window);
-  device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
-
-  return gdk_drag_begin_for_device (window, device, formats);
-}
-
-/**
- * gdk_drag_begin_for_device:
- * @window: the source window for this drag
- * @device: the device that controls this drag
- * @formats: (transfer none): the offered formats
- *
- * Starts a drag and creates a new drag context for it.
- *
- * This function is called by the drag source.
- *
- * Returns: (transfer full): a newly created #GdkDragContext
- */
-GdkDragContext *
-gdk_drag_begin_for_device (GdkWindow *window,
-                           GdkDevice *device,
-                           GdkContentFormats *formats)
-{
-  gint x, y;
-
-  gdk_device_get_position (device, &x, &y);
-
-  return gdk_drag_begin_from_point (window, device, formats, x, y);
-}
-
-/**
- * gdk_drag_begin_from_point:
  * @window: the source window for this drag
  * @device: the device that controls this drag
  * @formats: (transfer none): the offered formats
@@ -6987,15 +6936,13 @@ gdk_drag_begin_for_device (GdkWindow *window,
  * This function is called by the drag source.
  *
  * Returns: (transfer full): a newly created #GdkDragContext
- *
- * Since: 3.20
  */
 GdkDragContext *
-gdk_drag_begin_from_point (GdkWindow         *window,
-                           GdkDevice         *device,
-                           GdkContentFormats *formats,
-                           gint               x_root,
-                           gint               y_root)
+gdk_drag_begin (GdkWindow         *window,
+                GdkDevice         *device,
+                GdkContentFormats *formats,
+                gint               x_root,
+                gint               y_root)
 {
   return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->drag_begin (window, device, formats, x_root, y_root);
 }
index 3bfc4175a92901a82acf3ee41b345303d7af1e03..08c1117b9525f8fbd51858e9f59ca3fe0acb48eb 100644 (file)
@@ -1120,7 +1120,7 @@ gtk_drag_begin_internal (GtkWidget          *widget,
   else
     gdk_device_get_position (pointer, &start_x, &start_y);
 
-  context = gdk_drag_begin_from_point (ipc_window, pointer, target_list, start_x, start_y);
+  context = gdk_drag_begin (ipc_window, pointer, target_list, start_x, start_y);
 
   gdk_drag_context_set_device (context, pointer);